package com.infore.qualityControl.outsideInterface.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.infore.qualityControl.bo.QualityParamOutSelectBo;
import com.infore.qualityControl.outsideInterface.service.IDataAuditOutsideService;
import com.infore.qualityControl.util.ResultEntity;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
/**
 * 数据审核外部接口调用控制器
 * @author Cold
 *
 */
@Api(value = "数据审核外部接口调用控制器", tags = {"数据审核外部接口调用控制器"})
@RestController
@RequestMapping("/dataAuditOutside")
public class DataAuditOutsideController {
	
	@Autowired
	IDataAuditOutsideService iDataAuditOutsideService;
	
	@ApiOperation(value = "获取24小时零点漂移数据") 
	@ResponseBody
	@RequestMapping(value = "/zeroDriftData", method = RequestMethod.POST)
	public ResultEntity zeroDriftData(@RequestBody QualityParamOutSelectBo qualityParamOutSelectBo) {
		return iDataAuditOutsideService.zeroDriftData(qualityParamOutSelectBo);
	}
	
	
	@ApiOperation(value = "获取24小时跨度漂移数据")
	@ResponseBody
	@RequestMapping(value = "/spanDriftData", method = RequestMethod.POST)
	public ResultEntity spanDriftData(@RequestBody QualityParamOutSelectBo qualityParamOutSelectBo) {
		return iDataAuditOutsideService.spanDriftData(qualityParamOutSelectBo);
	}
	
	@ApiOperation(value = "获取站点内监测项的设备参数数据")
	@ApiImplicitParams({
		@ApiImplicitParam(name = "stationCode", value = "站点编码", paramType = "query", required = false, dataType = "String"),
		@ApiImplicitParam(name = "indexCode", value = "监测项编码", paramType = "query", required = false, dataType = "String")})
	@ResponseBody
	@RequestMapping(value = "/equipmentParameterData", method = RequestMethod.GET)
	public ResultEntity equipmentParameterData(String stationCode, String indexCode) {
		return iDataAuditOutsideService.equipmentParameterData(stationCode, indexCode);
	}
}
